#include <stdio.h>
#include <stdlib.h>

//https://www.nowcoder.com/practice/6564a2f6e70f4153ad1ffd58b2b28490?tpId=290&tags=&title=&difficulty=0&judgeStatus=0&rp=0&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D290

typedef struct Arr {
    int n;
    int arr[0];
}Arr;

int Campares(const void *num1, const void *num2) {
    return *(int *)num1 - *(int *)num2;
}

int main() {
    int num = 0;
    scanf("%d", &num);
    Arr *arr = (Arr *) malloc(sizeof(Arr) + num * sizeof(int));
    if (arr == NULL) {
        perror("堆区空间开辟失败:");
    }
    arr->n = num;
    for (int i = 0; i < arr->n; i++) {
        scanf("%d", &arr->arr[i]);
        for (int j = 0; j < i; j++) {
            if (arr->arr[j] == arr->arr[i]) {
                i--;
                arr->n--;
                break;
            }
        }
    }
    for (int i = 0; i < arr->n; i++) {
        printf("%d ", arr->arr[i]);
    }
    return 0;
}